
var CacheList = new Pearlsen.BaseList({
	gridId:'cacheGrid',
	advSearchId:'advSearchWin',
	module:'缓存',
	modulePath:'/pages/sysmgr/cachemgr/',
	moduleName:'CacheMgr',
	idProperty:'cacheId',
	nameProperty:'cacheName',
	dataSetHandler:'CacheDataSetHandler',
	queryHandler:'CacheQueryHandler',
	
	clearCache:function(){
		var me = CacheList ;
  		var grid=me.getGrid();
		var record= grid.getSelectionModel().getLastSelected();
		if(record){
			var ds=new DataSet('CacheDataSetHandler','CacheQueryHandler');
	      	ds.setHandlerMethod("clearCache");
	      	ds.addCondition("cacheName",record.get('name'));
			ds.execute(me.afterClearCache);
		}else{
			Pearlsen.Utils.showInfoMsg("请选择一条记录!");	
		}
		
	},
	
	afterClearCache:function(result){
		var me = CacheList ;
		if( result.success ){
			Pearlsen.Utils.showInfoMsg("清除缓存成功!");	
			GlobalEvent.fireEvent(me.moduleName+"_refresh_list");
		}else{
			Pearlsen.Utils.showErrorMsg("清除缓存出错，原因:"+result.message);
		}
	},
	
	quickSearch:function(){
		
	}

});

